package com;


import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;

@EnableBinding(Sink.class)
public class MsgReceiver {

	@StreamListener(Sink.INPUT)
	public void receive(Message<String> message) {
        System.out.println("The msg is:" + JSONObject.toJSONString(message));
    }
}